<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>load.html</title>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript" src="jquery-1.6.js"></script>
  	<script type="text/javascript">

  	$(function(){
		var s=$("#account");
		s.keyup(function(event){
			var myEvent=event ||window.event;
			var kcode=myEvent.keyCode;
			if(kcode==13){
			alert("你好");
				}
		});
  	});
  		var url="get_post.jsp";
  		function getfun(){
			$.get(url,getID(),function(data){
				//alert(data);
				//$("#show").html("");
				$("#show").append(data);
			});
  	  	}

  	  	function getID(){
			var account=$("#account").val();
			var pwd=$("#pwd").val();

			var str={name:account,pwd:pwd};
			return str;
  	  	}
  	</script>
  </head>
  
  <body>
  
  账号：<input type="text" id="account"/><br/>
  密码:<input type="text" id="pwd"><br/>
   <button onclick="getfun();">异步交互</button>
  	<div id="show"></div>
  </body>
</html>
